Adding an SSH key of a developer to the private-packages repo
- Have the developer generate an SSH key pair on their local machine. This can be done by running the following command in a terminal window:
ssh-keygen -t rsa -b 4096 -C "{developer-email}"
- Have the developer copy the public key, which is located in the
~/.ssh/id_rsa.pubfile. This can be done by running the following command:
cat ~/.ssh/id_rsa
.pub
Add the public key to the private-packages repository as a deploy key. This can typically be done through the repository's settings page on the hosting platform (e.g. GitHub, GitLab, etc.).
Have the developer add the private key to their local SSH agent. This can be done by running the following command:
eval "$(ssh-agent -s)"
ssh-add ~/.ssh/id_rsa